# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html

import scrapy


class SpiderprojectItem(scrapy.Item):
    # define the fields for your item here like:
    # name = scrapy.Field()
    pass
class ZhilianItem(scrapy.Item):
    url = scrapy.Field()
    title = scrapy.Field()
    smoney = scrapy.Field()
    emoney = scrapy.Field()
    city = scrapy.Field()
    release_time = scrapy.Field()
    job_type = scrapy.Field()
    syear = scrapy.Field()
    eyear = scrapy.Field()
    edu = scrapy.Field()
    groups = scrapy.Field()
    content = scrapy.Field()
    adds = scrapy.Field()
    label = scrapy.Field()
    source = scrapy.Field()
    def get_sql(self):
        sql = 'insert into project values(Null,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)'
        data = [self['url'],self['title'],self['smoney'],self['emoney'],self['city'],self['release_time'],self['job_type'],self['syear'],self['eyear'],self['edu'],self['groups'],self['content'],self['adds'],self['label'],self['source']]
        return sql , data












